package com.hongyun.tms.common.dto.mrate;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 船舶费率 新增参数
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
public class MRateSaveReqDto implements Serializable {

    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "船长-起")
    @NotNull(message = "船长-起 不能为空")
    @Min(value = 0, message = "船长-起的最小长度为0")
    @Max(value = 999, message = "船长-起的最大长度为999")
    private Integer lengthStart;

    @ApiModelProperty(value = "船长-止")
    @NotNull(message = "船长-止 不能为空")
    @Min(value = 0, message = "船长-止的最小长度为0")
    @Max(value = 999, message = "船长-止的最大长度为999")
    private Integer lengthEnd;

    @ApiModelProperty(value = "贸别：内贸，外贸")
    @NotBlank(message = "贸别不能为空")
    private String tradeType;

    @ApiModelProperty(value = "船舶类型代码")
    @NotBlank(message = "船舶类型代码不能为空")
    private String shipKindCode;

    @ApiModelProperty(value = "船舶类型名称")
    @NotBlank(message = "船舶类型不能为空")
    @Size(max = 10, message = "类型名称最多可输入10个字符")
    private String shipKindName;

    @ApiModelProperty(value = "费率")
    @NotNull(message = "费率不能为空")
    @Min(value = 0, message = "费率不能小于0")
    @Max(value = 999999, message = "费率过大")
    private Long rate;
}

